#include "Weekday.h"

#include <string.h>
#include <fan-llvm/core/Core.h>
#include "Type.h"
#include "UnsupportedErr.h"


Type* Weekday_classType = NULL;
VTable* Weekday_classVTable = NULL;


/**********************************************
 *
 * Methods and fields
 *
 **********************************************/


/* Weekday sun */
Weekday* Weekday_sun(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.sun not implemented yet"));
}


/* Weekday mon */
Weekday* Weekday_mon(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.mon not implemented yet"));
}


/* Weekday tue */
Weekday* Weekday_tue(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.tue not implemented yet"));
}


/* Weekday wed */
Weekday* Weekday_wed(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.wed not implemented yet"));
}


/* Weekday thu */
Weekday* Weekday_thu(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.thu not implemented yet"));
}


/* Weekday fri */
Weekday* Weekday_fri(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.fri not implemented yet"));
}


/* Weekday sat */
Weekday* Weekday_sat(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.sat not implemented yet"));
}


/* Weekday[] vals */
List* Weekday_vals(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.vals not implemented yet"));
}


/* Weekday increment() */
Weekday* Weekday_increment(Weekday* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.increment not implemented yet"));
}


/* Weekday decrement() */
Weekday* Weekday_decrement(Weekday* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.decrement not implemented yet"));
}


/* Str toLocale(Str? pattern) */
Str* Weekday_toLocale_0(Weekday* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.toLocale not implemented yet"));
}


/* Str toLocale(Str? pattern) */
Str* Weekday_toLocale(Weekday* self, Str* pattern)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.toLocale not implemented yet"));
}


/* Str localeAbbr() */
Str* Weekday_localeAbbr(Weekday* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.localeAbbr not implemented yet"));
}


/* Str localeFull() */
Str* Weekday_localeFull(Weekday* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.localeFull not implemented yet"));
}


/* Weekday localeStartOfWeek() */
Weekday* Weekday_localeStartOfWeek(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.localeStartOfWeek not implemented yet"));
}


/* Weekday[] localeVals() */
List* Weekday_localeVals(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.localeVals not implemented yet"));
}


/* Weekday? fromStr(Str name, Bool checked) */
Weekday* Weekday_fromStr_1(Str* name)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.fromStr not implemented yet"));
}


/* Weekday? fromStr(Str name, Bool checked) */
Weekday* Weekday_fromStr(Str* name, Bool checked)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Weekday.fromStr not implemented yet"));
}


/**********************************************
 *
 * Type-system functions
 *
 **********************************************/


Type* Weekday_initType(void)
{
  if (Weekday_classType == NULL)
  {
    Type* baseType = Enum_initType();
    VTable* vtable = Weekday_initVTable();
    Type* type = Type_new("Weekday", baseType, vtable, sizeof(Weekday), sizeof(WeekdayVTable));
    Type_registerMethodImplementation(type, "decrement", Weekday_decrement, 0);
    Type_registerMethodImplementation(type, "fromStr", Weekday_fromStr_1, 1);
    Type_registerMethodImplementation(type, "fromStr", Weekday_fromStr, 2);
    Type_registerMethodImplementation(type, "increment", Weekday_increment, 0);
    Type_registerMethodImplementation(type, "localeAbbr", Weekday_localeAbbr, 0);
    Type_registerMethodImplementation(type, "localeFull", Weekday_localeFull, 0);
    Type_registerMethodImplementation(type, "localeStartOfWeek", Weekday_localeStartOfWeek, 0);
    Type_registerMethodImplementation(type, "localeVals", Weekday_localeVals, 0);
    Type_registerMethodImplementation(type, "toLocale", Weekday_toLocale_0, 0);
    Type_registerMethodImplementation(type, "toLocale", Weekday_toLocale, 1);
    Type_registerFieldImplementation(type, "fri", Weekday_fri, NULL);
    Type_registerFieldImplementation(type, "mon", Weekday_mon, NULL);
    Type_registerFieldImplementation(type, "sat", Weekday_sat, NULL);
    Type_registerFieldImplementation(type, "sun", Weekday_sun, NULL);
    Type_registerFieldImplementation(type, "thu", Weekday_thu, NULL);
    Type_registerFieldImplementation(type, "tue", Weekday_tue, NULL);
    Type_registerFieldImplementation(type, "vals", Weekday_vals, NULL);
    Type_registerFieldImplementation(type, "wed", Weekday_wed, NULL);
    Weekday_classType = type;
    Weekday_initStatic();
  }
  return Weekday_classType;
}


VTable* Weekday_initVTable(void)
{
  if (Weekday_classVTable == NULL)
  {
    VTable* vtable = memoryAlloc(sizeof(WeekdayVTable));
    memcpy(vtable, Enum_initVTable(), sizeof(EnumVTable));
    Weekday_classVTable = vtable;
  }
  return Weekday_classVTable;
}


void Weekday_initStatic(void)
{
}
